package ar.uba.fi.tonyvaliente.text.filtering;

import java.util.HashMap;
import java.util.LinkedList;

public class SkeepDuplicatedFilter implements TextFilter {
	public LinkedList<String> filter(LinkedList<String> text) {
		LinkedList<String> result = new LinkedList<String>();
		HashMap<String, Integer> filtered = new HashMap<String, Integer>();
		for (String s : text) {
			if (!filtered.containsKey(s)) {
				result.add(s);
				filtered.put(s, 0);
			}
		}
		return result;
	}
}
